﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebRoute.aspx.cs" Inherits="WebClient.WebClient" %>

<!DOCTYPE html>

<html>
<head runat="server">

    <title>Ruteplanlægning</title>
    <link href="Css.css" rel="stylesheet" type="text/css" />
    <style type="text/css">
        .auto-style2 {
            width: 38px;
        }
    </style>
</head>

<body>

    <form runat="server">
        <div id="bannerdiv">
            <img src="pictures\logo_better-place.png" alt="BETTERPLACE - Logo load failed" />

  

        </div>
        <div>
            <table id="tbllink" frame="border">
                <tr>
                    <td class="auto-style2">
                        <asp:Button class="btnlink" runat="server" Text="Ruteplanlægning" /></td>

                    <td>
                        <asp:Button class="btnlink" runat="server" Text="Reservation" OnClick="btnreslink_Click" />
                </tr>

            </table>
        </div>

        <div id="rutefinddiv2">
            <div id="rutefinddiv">
                <p>
                    <asp:DropDownList ID="DropDownCustomer" runat="server" DataSourceID="personBindingSource"
                            DataTextField="Name" DataValueField="Id" AppendDataBoundItems="True" OnSelectedIndexChanged="DropDownStartStation_SelectedIndexChanged">
                        </asp:DropDownList>
                        <asp:ObjectDataSource runat="server" ID="personBindingSource" SelectMethod="GetAllCustomers"
                            TypeName="WebApplication1.ClientServiceReference.Customer"></asp:ObjectDataSource>
                </p>
                <p>
                    <asp:DropDownList ID="DropDownStartStation" runat="server" DataSourceID="stationBindingSource"
                            DataTextField="Name" DataValueField="Id" AppendDataBoundItems="True" AutoPostBack="true">
                        </asp:DropDownList>
                        <asp:ObjectDataSource runat="server" ID="stationBindingSource" SelectMethod="GetAllStations"
                            TypeName="WebApplication1.ClientServiceReference.Station"></asp:ObjectDataSource>
                </p>
                <p>
                    <asp:DropDownList ID="DropDownEndStation" runat="server" AutoPostBack="True" DataTextField="Name" DataValueField="Id" DataSourceID="stationBindingSource">
                    </asp:DropDownList>
                </p>
                <p style="margin-left: 40px">
                    <asp:Button ID="btnFindRoute" runat="server" Style="margin-bottom: 0px" Text="Find Route" Width="75px" OnClick="btnFindRoute_Click" />
                </p>
            </div>
        </div>



        <div style="overflow-y: scroll" id="gridroutediv">
            <asp:Panel CssClass="pnlgridcurroute" runat="server">
                <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataSourceID="routeBindingSource">
                    <Columns>
                        <asp:BoundField DataField="Id" HeaderText="Id" SortExpression="Id" />
                        <asp:BoundField DataField="Date" HeaderText="Date" SortExpression="Date" />
                        <asp:BoundField DataField="Status" HeaderText="Status" SortExpression="Status" />
                        <asp:BoundField DataField="Route" HeaderText="Rute" SortExpression="Route" />
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="routeBindingSource" runat="server" SelectMethod="GetAllReservations" TypeName="WebApplication1.ClientServiceReference.Reservation"></asp:ObjectDataSource>
            </asp:Panel>

        </div>
        <div id="btnsclearresdiv2">
            <div id="btnsclearresdiv">

                <p>
                    <asp:Button ID="btnClear" runat="server" Text="Ryd" />
                    &nbsp;&nbsp;&nbsp;&nbsp;
                <asp:Button ID="btnOpretReservation" runat="server" Text="Opret Reservation" />
                </p>
            </div>
        </div>
    </form>
</body>
</html>
